﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace 招聘网站
{
    public partial class Form8 : Form
    {
        public Form8()
        {

            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form7 f7=new Form7();
            f7.Show();
            this.Hide();

        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form6 f6 = new Form6();
            f6.Show();
            this.Hide();

        }

        private void label5_Click(object sender, EventArgs e)
        {

        }

        private void Form8_Load(object sender, EventArgs e)
        {

            string sqlStr = "server=.;database=zhaopin;integrated security=SSPI";
            SqlConnection con = new SqlConnection(sqlStr);
            con.Open();
            string selectsql = string.Format("Select * from table_6 ", con);
            SqlCommand com = new SqlCommand(selectsql, con);
            com.CommandType = CommandType.Text;
            SqlDataReader sdr;
            sdr = com.ExecuteReader();
            while (sdr.Read())
            {
                if (Form6.i == sdr["name"].ToString().Trim ())
                {
                    label3.Text = "看过";
                    label5.Text = sdr["guanjianci"].ToString();
                }
                else
                {
                    label3.Text = "未看过";
                }
            }
            sdr.Close();
            con.Close();
        }
    }
}
